﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Gencode.Gengui.Wizzard;

namespace Gencode.PrsUtil.InitWizard
{
    [ToolboxItem(false)]
	public partial class InitUser : Gencode.Gengui.Wizzard.WizzardControl
	{
		public InitUser(string previousControl, string nextControl, WizzardDialog controler)
			: base(previousControl, nextControl, controler)
		{
			InitializeComponent();
		}

		public override void InitializeWizzardControl()
		{
			//Do not show Control. Just move to next and add year
			//Control is not finished designed
			//will only add a default user bacause multiple users are not implemented yet
			Controler.MoveNext();
		}

		public override bool MoveNext()
		{
			InitData da = Controler.DataObjects.GetType(typeof(InitData)) as InitData;
			Gencode.PrsCommon.Data.Common.CommonData.AddUser("Personalplaner", "linde", "personalplaner", "Default user", 1, da.Mandid);
			da.User = "linde";

			return base.MoveNext();
		}
	}
}
